#[derive(Debug)]
struct Abc {}

impl Abc {
//    fn new() -> Abc {
//        return Abc{};
//    }
}

pub trait A {
    fn test_a(&self);
}

pub trait B {
    fn test_b(&self);
}

impl A for Abc {
    fn test_a(&self) {
        println!("The impl is A");
    }
}

impl B for Abc {
    fn test_b(&self) {
        println!("The impl is B");
    }
}

pub fn print_ab<T: A + B>(ab: T) {
    ab.test_a();
    ab.test_b();
}

#[test]
fn print_ab_test() {
    let abc = Abc {};
    print_ab(abc);
    assert!(true);
}

#[derive(Debug)]
pub struct Rectangle {
    width: u32,
    height: u32,
}

impl Rectangle {
    pub fn new(width: u32, height: u32) -> Rectangle {
        Rectangle {
            width,
            height,
        }
    }
    pub fn area(&self) -> u32 {
        return self.width * self.height;
    }
}
